﻿//using HongYeSystemWebApi.Templet.Entity.Model;
//using System;
//using System.Collections.Generic;
//using System.Data.Common;
//using System.Linq.Expressions;
//using System.Text;
//using System.Threading.Tasks;

//namespace HongYeSystemWebApi.Templet.Core.Data
//{
//    public interface IRepository<TEntity, TKey> where TEntity : BaseEntity
//    {

//     //   ISqlSugar _freeSql { get; }
//        long Insert(TEntity entity, DbTransaction dbTransaction = null);

//        long Insert(List<TEntity> entities, DbTransaction dbTransaction = null);

//        Task<long> InsertAsync(TEntity entity, DbTransaction dbTransaction = null);

//        Task<long> InsertAsync(List<TEntity> entities, DbTransaction dbTransaction = null);

//        int Delete(TKey id, DbTransaction dbTransaction = null);

//        Task<int> DeleteAsync(TKey id, DbTransaction dbTransaction = null);

//        int Delete(List<TEntity> entities, DbTransaction dbTransaction = null);

//        Task<int> DeleteAsync(List<TEntity> entities, DbTransaction dbTransaction = null);

//        int HardDelete(TKey id, DbTransaction dbTransaction = null);

//        Task<int> HardDeleteAsync(TKey id, DbTransaction dbTransaction = null);

//        int HardDelete(Expression<Func<TEntity, bool>> whereLambda = null, DbTransaction dbTransaction = null);

//        Task<int> HardDeleteAsync(Expression<Func<TEntity, bool>> whereLambda = null, DbTransaction dbTransaction = null);

//        int Update(TEntity entity, DbTransaction dbTransaction = null);

//        Task<int> UpdateAsync(TEntity entity, DbTransaction dbTransaction = null);

//        int Update(List<TEntity> entities, DbTransaction dbTransaction = null);

//        Task<int> UpdateAsync(List<TEntity> entities, DbTransaction dbTransaction = null);

//        TEntity GetById(TKey id);

//        Task<TEntity> GetByIdAsync(TKey id);

//        (List<TEntity> data, long total) GetList<TCloumn>(int pageNumber, int pageSize, Expression<Func<TEntity, bool>> whereLambda
//             , Expression<Func<TEntity, TCloumn>> orderbyLambda, bool isAes);

//        Task<(List<TEntity> data, long total)> GetListAsync<TCloumn>(int pageNumber, int pageSize, Expression<Func<TEntity, bool>> whereLambda
//            , Expression<Func<TEntity, TCloumn>> orderbyLambda, bool isAes);

//        Task<(List<TEntity> data, long total)> GetListAsync(int pageNumber, int pageSize, Expression<Func<TEntity, bool>> whereLambda
//           , Dictionary<string, bool> orderByProperties);

//        TEntity Get(Expression<Func<TEntity, bool>> whereLambda);

//        Task<TEntity> GetAsync(Expression<Func<TEntity, bool>> whereLambda);

//        long GetCount(Expression<Func<TEntity, bool>> whereLambda = null);

//        Task<long> GetCountAsync(Expression<Func<TEntity, bool>> whereLambda = null);

//        List<TEntity> GetList(Expression<Func<TEntity, bool>> whereLambda = null);

//        Task<List<TEntity>> GetListAsync(Expression<Func<TEntity, bool>> whereLambda = null);

//        List<TEntity> GetListWithSql(string sql);

//        Task<List<TEntity>> GetListWithSqlAsync(string sql);

//        string GetTableName();

//        string GetTableName<T>();

//        Task<string> GetTableNameAsync();
//    }
//}